From 45244f3cd1716008b27a31957472d2abf71c55a1 Mon Sep 17 00:00:00 2001 From: user virtual Date: Tue, 25 Jan 2011 16:42:00 +0000 Subject: [PATCH] tools/hotplug/Linux: fix completely wrong attempts to stop xenwatchdogd "xen-watchdog stop" attempts to kill non existing "watchdogd" but misses the running "xenwatchdogd". This also provokes errors during install and Debian package management. Signed-off-by: user virtual Acked-by: Ian Jackson Signed-off-by: Ian Jackson Committed-by: Ian Jackson --- tools/hotplug/Linux/init.d/xen-watchdog | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/hotplug/Linux/init.d/xen-watchdog b/tools/hotplug/Linux/init.d/xen-watchdog index 620e8415d0..a5b3f6b961 100644 --- a/tools/hotplug/Linux/init.d/xen-watchdog +++ b/tools/hotplug/Linux/init.d/xen-watchdog @@ -17,6 +17,9 @@ ### END INIT INFO # +DAEMON=/usr/sbin/xenwatchdogd +base=$(basename $DAEMON) + # Source function library. if [ -e /etc/init.d/functions ] ; then . /etc/init.d/functions @@ -39,10 +42,9 @@ fi start() { local r - base="watchdogd" echo -n $"Starting domain watchdog daemon: " - /usr/sbin/xenwatchdogd 30 15 + $DAEMON 30 15 r=$? [ "$r" -eq 0 ] && success $"$base startup" || failure $"$base startup" echo @@ -52,10 +54,9 @@ start() { stop() { local r - base="watchdogd" echo -n $"Stopping domain watchdog daemon: " - killall -USR1 watchdogd 2>/dev/null + killall -USR1 $base 2>/dev/null r=$? [ "$r" -eq 0 ] && success $"$base stop" || failure $"$base stop" echo -- 2.30.2